; generated by Component: ARM Compiler 5.06 update 7 (build 960) Tool: ArmCC [4d365d]
; commandline ArmCC [--list --split_sections --debug -c --asm --interleave -o..\out\bsp_msg.o --asm_dir=.\Lst\ --list_dir=.\Lst\ --depend=..\out\bsp_msg.d --cpu=Cortex-M4.fp.sp --apcs=interwork -O0 --diag_suppress=9931 -I..\Libraries\inc -I..\CMSIS -I..\users -I..\Libraries\src -I..\Libraries\sys -I..\COMM -I..\MOD -I..\CAN -D__MICROLIB -D__UVISION_VERSION=536 -D_RTE_ -DSTM32F412Rx -D_RTE_ -DSTM32F10X_HD -DUSE_STDPERIPH_DRIVER --omf_browse=..\out\bsp_msg.crf ..\MOD\bsp_msg.c]
                          THUMB

                          AREA ||i.bsp_ClearMsg||, CODE, READONLY, ALIGN=2

                  bsp_ClearMsg PROC
;;;125    */
;;;126    void bsp_ClearMsg(void)
000000  4803              LDR      r0,|L1.16|
;;;127    {
;;;128    	g_tMsg.Read = g_tMsg.Write;
000002  f8900141          LDRB     r0,[r0,#0x141]  ; g_tMsg
000006  4902              LDR      r1,|L1.16|
000008  f8810140          STRB     r0,[r1,#0x140]
;;;129    }
00000c  4770              BX       lr
;;;130    
                          ENDP

00000e  0000              DCW      0x0000
                  |L1.16|
                          DCD      g_tMsg

                          AREA ||i.bsp_GetMsg||, CODE, READONLY, ALIGN=2

                  bsp_GetMsg PROC
;;;62     */
;;;63     uint8_t bsp_GetMsg(MSG_T *_pMsg)
000000  4601              MOV      r1,r0
;;;64     {
;;;65     	MSG_T *p;
;;;66     
;;;67     	if (g_tMsg.Read == g_tMsg.Write)
000002  4811              LDR      r0,|L2.72|
000004  f8900140          LDRB     r0,[r0,#0x140]  ; g_tMsg
000008  4b0f              LDR      r3,|L2.72|
00000a  f8933141          LDRB     r3,[r3,#0x141]  ; g_tMsg
00000e  4298              CMP      r0,r3
000010  d101              BNE      |L2.22|
;;;68     	{
;;;69     		return 0;
000012  2000              MOVS     r0,#0
                  |L2.20|
;;;70     	}
;;;71     	else
;;;72     	{
;;;73     		p = &g_tMsg.Buf[g_tMsg.Read];
;;;74     
;;;75     		if (++g_tMsg.Read >= MSG_FIFO_SIZE)
;;;76     		{
;;;77     			g_tMsg.Read = 0;
;;;78     		}
;;;79     		
;;;80     		_pMsg->MsgCode = p->MsgCode;
;;;81     		_pMsg->MsgParam = p->MsgParam;
;;;82     		return 1;
;;;83     	}
;;;84     }
000014  4770              BX       lr
                  |L2.22|
000016  480c              LDR      r0,|L2.72|
000018  f8900140          LDRB     r0,[r0,#0x140]        ;73  ; g_tMsg
00001c  4b0a              LDR      r3,|L2.72|
00001e  eb0302c0          ADD      r2,r3,r0,LSL #3       ;73
000022  4618              MOV      r0,r3                 ;75
000024  f8900140          LDRB     r0,[r0,#0x140]        ;75  ; g_tMsg
000028  1c40              ADDS     r0,r0,#1              ;75
00002a  b2c0              UXTB     r0,r0                 ;75
00002c  f8830140          STRB     r0,[r3,#0x140]        ;75
000030  2828              CMP      r0,#0x28              ;75
000032  db02              BLT      |L2.58|
000034  2000              MOVS     r0,#0                 ;77
000036  f8830140          STRB     r0,[r3,#0x140]        ;77
                  |L2.58|
00003a  8810              LDRH     r0,[r2,#0]            ;80
00003c  8008              STRH     r0,[r1,#0]            ;80
00003e  6850              LDR      r0,[r2,#4]            ;81
000040  6048              STR      r0,[r1,#4]            ;81
000042  2001              MOVS     r0,#1                 ;82
000044  e7e6              B        |L2.20|
;;;85     
                          ENDP

000046  0000              DCW      0x0000
                  |L2.72|
                          DCD      g_tMsg

                          AREA ||i.bsp_GetMsg2||, CODE, READONLY, ALIGN=2

                  bsp_GetMsg2 PROC
;;;94     */
;;;95     uint8_t bsp_GetMsg2(MSG_T *_pMsg)
000000  4601              MOV      r1,r0
;;;96     {
;;;97     	MSG_T *p;
;;;98     
;;;99     	if (g_tMsg.Read2 == g_tMsg.Write)
000002  4811              LDR      r0,|L3.72|
000004  f8900142          LDRB     r0,[r0,#0x142]  ; g_tMsg
000008  4b0f              LDR      r3,|L3.72|
00000a  f8933141          LDRB     r3,[r3,#0x141]  ; g_tMsg
00000e  4298              CMP      r0,r3
000010  d101              BNE      |L3.22|
;;;100    	{
;;;101    		return 0;
000012  2000              MOVS     r0,#0
                  |L3.20|
;;;102    	}
;;;103    	else
;;;104    	{
;;;105    		p = &g_tMsg.Buf[g_tMsg.Read2];
;;;106    
;;;107    		if (++g_tMsg.Read2 >= MSG_FIFO_SIZE)
;;;108    		{
;;;109    			g_tMsg.Read2 = 0;
;;;110    		}
;;;111    		
;;;112    		_pMsg->MsgCode = p->MsgCode;
;;;113    		_pMsg->MsgParam = p->MsgParam;
;;;114    		return 1;
;;;115    	}
;;;116    }
000014  4770              BX       lr
                  |L3.22|
000016  480c              LDR      r0,|L3.72|
000018  f8900142          LDRB     r0,[r0,#0x142]        ;105  ; g_tMsg
00001c  4b0a              LDR      r3,|L3.72|
00001e  eb0302c0          ADD      r2,r3,r0,LSL #3       ;105
000022  4618              MOV      r0,r3                 ;107
000024  f8900142          LDRB     r0,[r0,#0x142]        ;107  ; g_tMsg
000028  1c40              ADDS     r0,r0,#1              ;107
00002a  b2c0              UXTB     r0,r0                 ;107
00002c  f8830142          STRB     r0,[r3,#0x142]        ;107
000030  2828              CMP      r0,#0x28              ;107
000032  db02              BLT      |L3.58|
000034  2000              MOVS     r0,#0                 ;109
000036  f8830142          STRB     r0,[r3,#0x142]        ;109
                  |L3.58|
00003a  8810              LDRH     r0,[r2,#0]            ;112
00003c  8008              STRH     r0,[r1,#0]            ;112
00003e  6850              LDR      r0,[r2,#4]            ;113
000040  6048              STR      r0,[r1,#4]            ;113
000042  2001              MOVS     r0,#1                 ;114
000044  e7e6              B        |L3.20|
;;;117    
                          ENDP

000046  0000              DCW      0x0000
                  |L3.72|
                          DCD      g_tMsg

                          AREA ||i.bsp_InitMsg||, CODE, READONLY, ALIGN=1

                  bsp_InitMsg PROC
;;;29     */
;;;30     void bsp_InitMsg(void)
000000  b500              PUSH     {lr}
;;;31     {
;;;32     	bsp_ClearMsg();
000002  f7fffffe          BL       bsp_ClearMsg
;;;33     }
000006  bd00              POP      {pc}
;;;34     
                          ENDP


                          AREA ||i.bsp_PutMsg||, CODE, READONLY, ALIGN=2

                  bsp_PutMsg PROC
;;;43     */
;;;44     void bsp_PutMsg(uint16_t _MsgCode, uint32_t _MsgParam)
000000  4a0c              LDR      r2,|L5.52|
;;;45     {
;;;46     	g_tMsg.Buf[g_tMsg.Write].MsgCode = _MsgCode;
000002  f8922141          LDRB     r2,[r2,#0x141]  ; g_tMsg
000006  4b0b              LDR      r3,|L5.52|
000008  f8230032          STRH     r0,[r3,r2,LSL #3]
;;;47     	g_tMsg.Buf[g_tMsg.Write].MsgParam = _MsgParam;
00000c  461a              MOV      r2,r3
00000e  f8922141          LDRB     r2,[r2,#0x141]  ; g_tMsg
000012  eb0302c2          ADD      r2,r3,r2,LSL #3
000016  6051              STR      r1,[r2,#4]
;;;48     
;;;49     	if (++g_tMsg.Write  >= MSG_FIFO_SIZE)
000018  461a              MOV      r2,r3
00001a  f8922141          LDRB     r2,[r2,#0x141]  ; g_tMsg
00001e  1c52              ADDS     r2,r2,#1
000020  b2d2              UXTB     r2,r2
000022  f8832141          STRB     r2,[r3,#0x141]
000026  2a28              CMP      r2,#0x28
000028  db02              BLT      |L5.48|
;;;50     	{
;;;51     		g_tMsg.Write = 0;
00002a  2200              MOVS     r2,#0
00002c  f8832141          STRB     r2,[r3,#0x141]
                  |L5.48|
;;;52     	}
;;;53     }
000030  4770              BX       lr
;;;54     
                          ENDP

000032  0000              DCW      0x0000
                  |L5.52|
                          DCD      g_tMsg

                          AREA ||.bss||, DATA, NOINIT, ALIGN=2

                  g_tMsg
                          %        324
